package com.ctshk.rpc.payment.dto.rep.alipay;

import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @BelongsProject: ctshk-cloud
 * @BelongsPackage: com.ctshk.rpc.payment.dto.rep.alipay
 * @Author: hef
 * @CreateTime: 2021-05-08 16:53
 * @Description: 描述
 */
@Data
public class AliPayRefundQueryDTO extends AliPayResponseCommonDTO implements Serializable {

    /**
     * <pre>
     * 返回数据
     * </pre>
     */
    private ResponseInfo response;



    @Data
    public static class ResponseInfo{
        private ResponseInfoItem alipay;
    }

    @Data
    public static class ResponseInfoItem{
        /**
         * 币种
         */
        private String currency;
        /**
         * 退款时使用的汇率，与原始付款时使用的汇率相同。小数点后最多可以有8位。
         */
        private String forexRate;
        /**
         * 接受退款请求的时间。
         */
        private LocalDateTime gmtCreate;
        /**
         * 退款成功的时间。
         */
        private LocalDateTime gmtFinished;
        /**
         * 商户退款id
         */
        private String outReturnNo;
        /**
         * 商户订单id
         */
        private String outTradeNo;
        /**
         * 退款金额
         */
        private BigDecimal refundForeignAmount;
        /**
         *退款状态。可能的值是:
         * SUCCESS: The refund is successful.
         * FAILED: The refund is failed.
         * CANCELED: The refund is canceled.
         * PROCESSING: The refund is being processed in Alipay system.
         */
        private String refundResultCode;
        /**
         * 退款金额(人民币)。取值范围为0.01 ~ 1000000.00，小数点后最多2位。
         */
        private BigDecimal refundRmbAmount;
        /**
         *The result of the inquiry request. Possible values are:
         * SUCCESS: The request is successful.
         * ACCESS_FORBIDDEN: You are not permitted to use this service.
         * NOT_FOUND: No refund is found.
         * QUERY_FAILED: The inquiry is failed.
         * TRADE_NOT_EXIST: The transaction does not exist.
         */
        private String responseCode;
        /**
         * 支付宝为识别支付宝系统中的交易而分配的序列号，长度在16 - 64位之间。
         */
        private String tradeNo;
    }

}
